home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga News 95
/
Amiga News 95.iso
/
dpat
/
dpat84
/
errormsg
/
rexx
/
showerm.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1994-06-15
|
2KB
|
72 lines
/* demo program for errormsg.library's arexx functions */
/*******************************************************/
/* */
/* $VER: rexx:ShowERM.rexx V1.0 (15.06.94) */
/* */
/* Requires errormsg.library V2.0+ (of course) */
/* */
/* ©1994 F.Delacroix, fully public domain */
/* */
/*******************************************************/
/* Make sure errormsg.library is available */
IF ~SHOW('Libraries','errormsg.library') THEN
IF ~ADDLIB('errormsg.library',0,-60,2) THEN RETURN 20
say "This is an ARexx program that shows the ARexx capacities of"
say "the errormsg.library V2.0+ ." || "0A"X
say " For the menues 4,5 and 6 to work, you'll have to install"
say " the program named ERMID.rexx into your REXX: directory." || "0A"X
say "Press Return to continue..." || "0A"X
say "Frédéric Delacroix"
say "5 rue d'Artres"
say "59269 Querenaing"
say "France."
pull .
/* Initialize the menu string */
menu='0c'X ||,
' 1. Enter error code' || '0A'X ||,
' 2. Enter system code' || '0A'X ||,
' 3. Enter subsystem code' || '0A'X ||,
' 4. Get number for error code' || '0A'X ||,
' 5. Get number for system code' || '0A'X ||,
' 6. Get number for subsystem code' || '0A'X ||,
' 7. Show message' || '0A'X ||,
' 8. Display message' || '0A'X ||,
' 9. Alert message' || '0A'X ||,
' 0. Exit' || '0A 0A'X
Code=0; System=0; SubSystem=0
/* Show the menu */
do until choice=0
say menu
say 'Code: ' Code 'System:' System 'SubSystem:' SubSystem
pull Choice .
select
when choice=1 then do
say "Enter error code:"
pull code
end
when choice=2 then do
say "Enter system code:"
pull system
end
when choice=3 then do
say "Enter subsystem code:"
pull subsystem
end
when choice=4 then code=ERMID(code)
when choice=5 then system=ERMID(system)
when choice=6 then subsystem=ERMID(subsystem)
when choice=7 then do
say "Error message is:" geterrormsg(code,system,subsystem);
say "Press Return to continue."
pull .
end
when choice=8 then call displayerrormsg(code,system,subsystem,,'Error message',,)
when choice=9 then call alerterrormsg(code,system,subsystem)
otherwise nop
end
end